#include "imGraphics.h"

using namespace imGraphics;

iRenderer* imGraphics::g_GFX; // Global

iTexture* imGraphics::g_DefTextures[NUMTEXTURES];

iTexture* imGraphics::GetTexture(std::string &Path) {
	iTexture* Tex = g_GFX->GetNewTexture();
	Tex->LoadFromFile(Path);
	return Tex;
}

void imGraphics::InitDefaultTextures() {
	g_DefTextures[0] = g_GFX->GetNewTexture();
	g_DefTextures[1] = g_GFX->GetNewTexture();
	g_DefTextures[2] = g_GFX->GetNewTexture();
	
	g_DefTextures[TEX_DIFFUSE]->FillSolid(Vector4(1.0, 1.0, 1.0, 1.0));
	g_DefTextures[TEX_SPECULAR]->FillSolid(Vector4(0.0, 0.0, 0.0, 1.0));
	g_DefTextures[TEX_NORMAL]->FillSolid(Vector4(0.5, 0.5, 1.0, 1.0));
}